#使⽤super() 可以⾃动查找⽗类。调⽤顺序遵循 __mro__ 类属性的顺序。⽐较适合单继承使⽤。
class Master(object):
  def __init__(self):
    self.kongfu="[古法煎饼果子配方]"
  def makeCake(self):
    print(f"运用{self.kongfu}制作煎饼果子")
    
class School(Master):
  def __init__(self):
    self.kongfu="[垃圾煎饼果子配方]"
  def makeCake(self):
    print(f"运用{self.kongfu}制作煎饼果子")
    #方法1
    # super(School,self).__init__()
    # super(School,self).makeCake()
    #方法2
    super().__init__()
    super().makeCake()
class Prentice(School,Master):
  def __init__(self):
    self.kongfu="[自创煎饼果子配方]"
  def makeCake(self):
    print(f"运用{self.kongfu}制作煎饼果子")
  def makeMasterCake(self):
    Master.__init__(self)
    Master.makeCake(self)
  def makeSchoolCake(self):
    School.__init__(self)
    School.makeCake(self)
    super().__init__()
    super().makeCake()
class tusun (Prentice):
  pass
daqiu=tusun()
# print(daqiu.kongfu)
daqiu.makeCake()
daqiu.makeMasterCake()
daqiu.makeSchoolCake()